﻿<%@ Page Language="C#" %>
<%
    int page = string.IsNullOrEmpty(Request.QueryString["page"]) ? 1 : int.Parse(Request.QueryString["page"]);
    string questr = Request.QueryString["questr"].ToString();
    string sql = "select * from systemproduct";
    if (!string.IsNullOrEmpty(questr))
    {
        sql += " where name like '%" + questr + "%'";
    }
    System.Data.DataSet ds = App_Code.PublicHelper.DatabaseHelper.ExecuteDataset(sql);
    if (ds != null && ds.Tables.Count > 0)
    {
        int count = ds.Tables[0].Rows.Count;
        for (int i = 0; i < count; i++)
        {
            System.Data.DataRow row = ds.Tables[0].Rows[i];
            string title = row.ItemArray[1].ToString();
            string desstr = row.ItemArray[2].ToString();
            string imgname = row.ItemArray[3].ToString();
            string id = row.ItemArray[0].ToString();
%>
<li class="span6">
    <div class="thumbnail">
        <div class="caption" style="border-bottom: dotted 1px #757575;">
            <h3>
                <%=title%>
                <small class="pull-right">
                    <a href="editor.aspx?s=<%=id %>" class="btn btn-info"><i class="icon-edit icon-white">
                    </i>编辑</a>
                    <button class="btn btn-danger" value='<%=id %>'>
                        <i class="icon-trash icon-white"></i>删除</button>
                </small>
            </h3>
        </div>
        <div style="padding: 9px 0;">
            <div class="main_content_img">
                <img class="main_thumnail" src="../../file/systemproduct/thumbnail/<%=imgname %>" />
            </div>
            <div class="main_content_description">
                <%=desstr%>
            </div>
            <div style="clear: both;">
            </div>
        </div>
    </div>
</li>
<%
    }
    }    
    
%>